﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GN.Pay.TradeChannel.Gyb.Response
{
    /// <summary>
    /// 
    /// </summary>
    [Serializable]
    class ProtocolPayResponse : AXmlResponse, ITradePayResult
    {
        public ProtocolPayResponse(string responseString, ITradeChannel channel,
          GybConfigure config) : base(responseString, channel, config)
        {

        }

        /// <summary>
        /// 交易缩写
        /// </summary>
        public string TranAbbr { get; set; }

        /// <summary>
        /// 商户号
        /// </summary>
        public string MercCode { get; set; }

        /// <summary>
        /// 网关流水
        /// </summary>
        public string AcqSsn { get; set; }

        /// <summary>
        /// 商户日期时间
        /// </summary>
        public string MercDtTm { get; set; }

        /// <summary>
        /// 订单号
        /// </summary>
        public string TermSsn { get; set; }

        /// <summary>
        /// 终端号
        /// </summary>
        public string TermCode { get; set; }

        /// <summary>
        /// 交易金额
        /// </summary>
        public decimal TranAmt { get; set; }

        /// <summary>
        /// 清算日期
        /// </summary>
        public string SettDate { get; set; }

        /// <summary>
        /// 转换为结果
        /// </summary>
        /// <returns></returns>
        public ITradeOrderQueryResult ToPayResult()
        {
            return PayConvertUtils.ToPayResult(this, this.channel);
        }
    }
}
